﻿namespace SvCore;

public class NetPack
{
    /// <summary>
    /// 数据长度
    /// </summary>
    public int DataLength { get; set; }
    /// <summary>
    /// 协议号
    /// </summary>
    public uint ProtocolId { get; set; }
    /// <summary>
    /// 错误码
    /// </summary>
    public ushort Ecode { get; set; }
    /// <summary>
    /// 数据
    /// </summary>
    public byte[] Content { get; set; }

    public bool IsComplete
    {
        get
        {
            if (DataLength == 0) return false;
            return DataLength == Content.Length;
        }
    }
}
